package com.ssl.basics.list;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 * 描述：
 *
 * @author shi_senlin
 * @create 2021/07/08 22:58
 */
public class ListUnSafe {
    public static void main(String[] args) throws InterruptedException {
        List<String> list = new ArrayList();
        for (int j = 0; j < 30; j++) {
            Thread thread = new Thread(() -> {
                list.add(UUID.randomUUID().toString());
                System.out.println(list);
            }, String.valueOf(j));
            thread.start();
            //thread.join();
        }
        System.out.println("SIZE ** "+list.size());


    }
}
